; The main subroutine is made the reset vector, the frame subroutine is made the
; NMI vector and the interrupt subroutine is made the IRQ vector. These
; subroutines must be exported to be seen as vectors.
export sub main
	dword flags
	
	flags.a = $12
	flags.b = $34
	flags.c = $56
	flags.d = $78
	if flags == $12345678
		flags = 0
	end if
end sub

; All vectors must be present
export sub frame
end sub

; Return statements for interrupt subs automatically use the rti instruction.
export sub interrupt
end sub
